﻿using MengLin.OOP.DesignPattern.CommandPattern.BasicCode.Abstract;
using MengLin.OOP.DesignPattern.CommandPattern.BasicCode.Implements;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MengLin.OOP.DesignPattern.CommandPattern.BasicCode
{
    class Program
    {
        static void Main(string[] args)
        {
            Receiver receiver = new Receiver();
            AbstractCommand command = new ConcreteCommand(receiver);
            Invoker invoker = new Invoker();

            //Set and execute command 
            invoker.SetCommand(command);
            invoker.ExecuteCommand();

            Console.Read();
        }
    }
}
